# Copyright (C) 2006  Apptility LLC  http://www.apptility.com
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

class AjubyDBMigration < ActiveRecord::Migration
  def self.up
  
  create_table "engine_schema_info", :id => false, :force => true do |t|
    t.column "engine_name", :string
    t.column "version", :integer
  end
  
  create_table "audits", :force => true do |t|
    t.column "auditable_id", :integer
    t.column "auditable_type", :string
    t.column "user_id", :integer
    t.column "action", :string
    t.column "changes", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  add_index "audits", ["auditable_id"], :name => "audits_auditable_id_index"
  add_index "audits", ["auditable_type"], :name => "audits_auditable_type_index"
  add_index "audits", ["user_id"], :name => "audits_user_id_index"
  add_index "audits", ["created_at"], :name => "audits_created_at_index"

  create_table "data_access_flags", :force => true do |t|
    t.column "name", :string, :limit => 55
    t.column "description", :string, :limit => 55
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
  end

  create_table "data_collections", :force => true do |t|
    t.column "role_id", :integer, :default => 0, :null => false
    t.column "module", :string, :limit => 55, :default => "", :null => false
    t.column "action", :string, :limit => 55, :default => "", :null => false
    t.column "collection_id", :integer, :default => 0, :null => false
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "organization_id", :integer
  end

  create_table "feed_deliveries", :force => true do |t|
    t.column "feed_id", :integer
    t.column "newsletter_id", :integer
    t.column "delivery_type", :integer
    t.column "user_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "feed_delivery_types", :force => true do |t|
    t.column "delivery_type", :string, :limit => 25
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "feed_newsletters", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :string, :limit => 200
    t.column "file_name", :string, :limit => 200
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "feed_post_updates", :force => true do |t|
    t.column "post_author", :integer
    t.column "post_date", :datetime
    t.column "post_date_gmt", :datetime
    t.column "post_content", :text
    t.column "post_title", :text
    t.column "post_category", :integer
    t.column "post_excerpt", :text
    t.column "post_status", :text
    t.column "comment_status", :text
    t.column "ping_status", :text
    t.column "post_password", :string, :limit => 20
    t.column "post_name", :string, :limit => 200
    t.column "to_ping", :text
    t.column "pinged", :text
    t.column "post_modified", :datetime
    t.column "post_modified_gmt", :datetime
    t.column "post_content_filtered", :text
    t.column "feed_id", :integer
    t.column "post_url", :text
    t.column "post_guid", :string, :limit => 100
    t.column "is_alive", :integer, :default => 1
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "feed_subscribers", :force => true do |t|
    t.column "feed_id", :integer
    t.column "email", :string, :limit => 100
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "feeds", :force => true do |t|
    t.column "user_id", :integer
    t.column "title", :text
    t.column "description", :text
    t.column "feed_url", :text
    t.column "guid", :text
    t.column "last_updated_time", :datetime
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "groups", :force => true do |t|
    t.column "name", :string, :default => "", :null => false
  end

  create_table "modules", :force => true do |t|
    t.column "name", :string, :limit => 55
    t.column "description", :string, :limit => 55
    t.column "usage_type", :string, :limit => 1
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
  end

  create_table "modules_permissions", :force => true do |t|
    t.column "role_id", :integer, :default => 0, :null => false
    t.column "permission_id", :integer, :default => 0, :null => false
    t.column "data_flag_id", :integer, :default => 0, :null => false
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "updated_by", :integer
    t.column "created_by", :integer
  end

  create_table "organizations", :force => true do |t|
    t.column "name", :string, :default => "", :null => false
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
  end

  create_table "permissions", :force => true do |t|
    t.column "controller", :string, :default => "", :null => false
    t.column "action", :string, :default => "", :null => false
    t.column "description", :string
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "permissions_roles", :id => false, :force => true do |t|
    t.column "permission_id", :integer, :default => 0, :null => false
    t.column "role_id", :integer, :default => 0, :null => false
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "rails_crons", :force => true do |t|
    t.column "command", :text
    t.column "start", :integer
    t.column "finish", :integer
    t.column "every", :integer
    t.column "concurrent", :boolean
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "reports", :force => true do |t|
    t.column "name", :string, :default => "", :null => false
    t.column "description", :string, :default => "", :null => false
  end

  create_table "roles", :force => true do |t|
    t.column "name", :string, :default => "", :null => false
    t.column "description", :string
    t.column "omnipotent", :boolean, :default => false, :null => false
    t.column "system_role", :boolean, :default => false, :null => false
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end

  create_table "users", :force => true do |t|
    t.column "login", :string, :limit => 80, :default => "", :null => false
    t.column "salted_password", :string, :limit => 40, :default => "", :null => false
    t.column "email", :string, :limit => 60, :default => "", :null => false
    t.column "firstname", :string, :limit => 40
    t.column "lastname", :string, :limit => 40
    t.column "salt", :string, :limit => 40, :default => "", :null => false
    t.column "verified", :integer, :default => 0
    t.column "role", :string, :limit => 40
    t.column "security_token", :string, :limit => 40
    t.column "token_expiry", :datetime
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "logged_in_at", :datetime
    t.column "deleted", :integer, :default => 0
    t.column "delete_after", :datetime
    t.column "organization_id", :integer
    t.column "is_enterprise", :string, :limit => 1
    t.column "created_by", :integer
    t.column "updated_by", :integer
  end

  add_index "users", ["organization_id"], :name => "organization_id"

  create_table "users_roles", :id => false, :force => true do |t|
    t.column "user_id", :integer, :default => 0, :null => false
    t.column "role_id", :integer, :default => 0, :null => false
    t.column "created_by", :integer
    t.column "updated_by", :integer
    t.column "organization_id", :integer
  end
  
  create_table "mashup_nodes", :force => true do |t|
    t.column "user_id", :integer
    t.column "name", :string, :limit => 50
    t.column "username", :string, :limit => 30
    t.column "password", :string, :limit => 100
    t.column "wsdl_url", :string, :limit => 200
    t.column "endpoint", :string, :limit => 200
    t.column "soap_action", :string, :limit => 200
    t.column "records_size", :integer, :default => 100
    t.column "debug_soap", :string, :limit => 200, :default => "false"
    t.column "custom_field1", :string, :limit => 100
    t.column "custom_field2", :string, :limit => 100
    t.column "custom_field3", :string, :limit => 100
    t.column "organization_id", :integer
  end
  
  create_table "dbbackups", :force => true do |t|
    t.column "name", :string, :limit => 50
    t.column "firstname", :string, :limit => 50
    t.column "lastname", :string, :limit => 30
    t.column "email", :string, :limit => 60
  end
  
  
  # Now Load the reference data.
  execute "INSERT INTO audits (id,auditable_id,auditable_type,user_id,action,changes,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('16','7','Feed','1','create','--- title: - - OpenAppDotOrg: Unofficial WordPress Blogguid: - - feed_url: - - http://wordpress.openapp.orgdescription: - - Unlocking the knowledgeuser_id: - - 1last_updated_time: - - 2006-10-17 00:28:26 -07:00','2007-01-23 22:35:16','2007-01-23 22:35:16',NULL,NULL,NULL);"
  execute "INSERT INTO audits (id,auditable_id,auditable_type,user_id,action,changes,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('17','1','Feed','1','update','--- last_updated_time: - 2007-01-19 02:16:30 -08:00- 2007-01-23 15:18:35 -08:00','2007-01-23 22:36:03','2007-01-23 22:36:03',NULL,NULL,NULL);"
  execute "INSERT INTO data_access_flags (id,name,description,created_at,updated_at,created_by,updated_by) VALUES ('1','Allow','Allow all records',NULL,NULL,'1','1');"
  execute "INSERT INTO data_access_flags (id,name,description,created_at,updated_at,created_by,updated_by) VALUES ('2','None','Do not allow any records',NULL,NULL,'1','1');"
  execute "INSERT INTO data_access_flags (id,name,description,created_at,updated_at,created_by,updated_by) VALUES ('3','Owner','Allow only owner created records',NULL,NULL,'1','1');"
  execute "INSERT INTO data_access_flags (id,name,description,created_at,updated_at,created_by,updated_by) VALUES ('4','Collection','Allow collection of records',NULL,NULL,'1','1');"
  execute "INSERT INTO engine_schema_info (engine_name,version) VALUES ('login_engine','1');"
  execute "INSERT INTO engine_schema_info (engine_name,version) VALUES ('user_engine','3');"
  execute "INSERT INTO feed_delivery_types (id,delivery_type,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('1','daily',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO feed_delivery_types (id,delivery_type,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('2','weekly',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO feed_delivery_types (id,delivery_type,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('3','monthly',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO feeds (id,user_id,title,description,feed_url,guid,last_updated_time,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('1','1','Riding Rails - home','',' http://weblog.rubyonrails.org/','tag:weblog.rubyonrails.com,2007:mephisto/','2007-01-23 15:18:35','2007-01-22 21:21:16','2007-01-23 22:36:03',NULL,NULL,NULL);"
  execute "INSERT INTO feeds (id,user_id,title,description,feed_url,guid,last_updated_time,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('7','1','OpenAppDotOrg: Unofficial WordPress Blog','Unlocking the knowledge',' http://wordpress.openapp.org','','2006-10-17 00:28:26','2007-01-23 22:35:16','2007-01-23 22:35:16',NULL,NULL,NULL);"
  execute "INSERT INTO groups (id,name) VALUES ('1','admin');"
  execute "INSERT INTO modules (id,name,description,usage_type,created_at,updated_at,created_by,updated_by) VALUES ('1','feed','feed management','F',NULL,NULL,'1','1');"
  execute "INSERT INTO organizations (id,name,created_at,updated_at,created_by,updated_by) VALUES ('1','enterprise',NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('1','role','new',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('2','role','list',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('3','role','edit',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('4','role','destroy',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('5','role','index',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('6','role','show',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('7','permission','new',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('8','permission','list',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('9','permission','edit',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('10','permission','destroy',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('11','permission','index',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('12','permission','show',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('13','user','new','new user',NULL,'2007-01-21 18:23:11',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('14','user','delete',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('15','user','list',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('16','user','restore_deleted',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('17','user','forgot_password',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('18','user','delete_user',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('19','user','logout',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('20','user','edit',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('21','user','change_password_for_user',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('22','user','edit_user',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('23','user','signup',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('24','user','show',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('25','user','edit_roles',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('26','user','login',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('27','user','home',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('28','user','change_password',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('29','organization','list',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('30','organization','new',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('31','organization','edit',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('32','organization','show',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('33','organization','index',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('34','feed','list','list feeds','2007-01-18 22:34:25','2007-01-18 22:34:25',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('35','feed','new','Create new RSS/ATOM Feed','2007-01-19 19:22:48','2007-01-19 19:22:48',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('36','feed','delete','Delete Feed','2007-01-19 19:23:32','2007-01-19 19:23:32',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('37','feed','edit','Edit Feed','2007-01-19 19:33:12','2007-01-19 19:33:12',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('41','dashboard','home','User Home Page','2007-01-21 21:21:07','2007-01-21 21:21:07',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('42','appaudit','list','Application Audit List','2007-01-22 10:00:40','2007-01-22 10:00:40',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('43','controlpanel','list','Control Panel Home Page','2007-01-22 10:03:49','2007-01-22 10:03:49',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('44','controlpanel','appconfig','Application Configuration','2007-01-22 10:06:35','2007-01-22 10:06:35',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('45','dataaccess','save','Save Data Security settings','2007-01-22 10:10:17','2007-01-22 10:10:17',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('46','group','list','List Of groups','2007-01-22 10:13:28','2007-01-22 10:13:28',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('47','group','search','Search Groups','2007-01-22 10:14:17','2007-01-22 10:14:17',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('48','group','update','Update Groups','2007-01-22 10:14:40','2007-01-22 10:14:40',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('49','group','edit','Edit Group','2007-01-22 10:15:13','2007-01-22 10:15:13',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('50','report','home','Reports Home','2007-01-22 10:16:20','2007-01-22 10:16:20',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('51','ws','list','Webservices List, Testing webservices,','2007-01-22 10:17:10','2007-01-22 10:17:10',NULL,NULL,NULL);"
  execute "INSERT INTO permissions (id,controller,action,description,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('52','feed','show','Show Feed','2007-01-22 22:59:52','2007-01-22 22:59:52',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('26','1',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('17','1',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('23','1',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('34','2','2007-01-18 22:34:25','2007-01-18 22:34:25',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('35','2','2007-01-19 19:22:48','2007-01-19 19:22:48',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('36','2','2007-01-19 19:23:32','2007-01-19 19:23:32',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('37','2','2007-01-19 19:33:12','2007-01-19 19:33:12',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('1','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('2','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('3','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('4','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('5','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('6','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('13','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('14','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('15','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('16','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('17','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('18','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('19','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('20','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('21','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('22','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('21','3',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('22','3',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('23','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('24','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('25','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('26','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('27','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('28','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('29','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('30','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('31','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('32','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('33','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('7','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('8','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('9','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('10','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('11','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('12','2',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('41','3','2007-01-21 21:21:07','2007-01-21 21:21:07',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('34','3','2007-01-18 22:34:25','2007-01-18 22:34:25',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('35','3','2007-01-19 19:22:48','2007-01-19 19:22:48',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('36','3','2007-01-19 19:23:32','2007-01-19 19:23:32',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('37','3','2007-01-19 19:33:12','2007-01-19 19:33:12',NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('19','3',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('20','3',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('27','3',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO permissions_roles (permission_id,role_id,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('28','3',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO rails_crons (id,command,start,finish,every,concurrent,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('1','Odotcron.feed_aggregator_start' ,'1154495202','1186052742','21600',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO rails_crons (id,command,start,finish,every,concurrent,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('2',' Odotcron.feed_deliver_daily','1154495202','1186052742','39600',NULL,NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO roles (id,name,description,omnipotent,system_role,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('1','Guest','Implicit role for all accessors of the site','0','1',NULL,NULL,NULL,NULL,NULL);"
  execute "INSERT INTO roles (id,name,description,omnipotent,system_role,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('2','Admin','The system administrator.','1','1',NULL,'2007-01-21 17:50:34',NULL,NULL,NULL);"
  execute "INSERT INTO roles (id,name,description,omnipotent,system_role,created_at,updated_at,created_by,updated_by,organization_id) VALUES ('3','User','The default role for all logged-in users','0','1',NULL,'2007-01-22 21:35:27',NULL,NULL,NULL);"
  execute "INSERT INTO users (id,login,salted_password,email,firstname,lastname,salt,verified,role,security_token,token_expiry,created_at,updated_at,logged_in_at,deleted,delete_after,organization_id,is_enterprise,created_by,updated_by) VALUES ('1','admin','d443d3ecae50025321ff74c96d0d7d8519d8c255',' admin@engineinstalls.com','System Man','Administrator','4730e600519941bba417b0fe110a860ffe2584db','1',NULL,NULL,NULL,'2006-05-22 08:42:44','2007-01-23 22:34:00','2007-01-23 22:34:00','0',NULL,'1','y',NULL,NULL);"
  execute "INSERT INTO users_roles (user_id,role_id,created_by,updated_by,organization_id) VALUES ('1','3',NULL,NULL,NULL);"
  execute "INSERT INTO users_roles (user_id,role_id,created_by,updated_by,organization_id) VALUES ('1','2',NULL,NULL,NULL);"
  execute "INSERT INTO reports (id,name,description) VALUES ('1','Audit Report','Audit Report of functional modules');"
  
  end

  def self.down
  end
end
